package com.wnhz.work.yz.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.wnhz.work.yz.BaseActivity;
import com.wnhz.work.yz.R;

/**
 * ---新增商品
 */
public class AddGoodsActivity extends BaseActivity implements View.OnClickListener {
    private TextView title;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_add_goods);

        initData();
        initView();
    }

    private void initData() {

    }

    private void initView() {
        title = (TextView) findViewById(R.id.view_main_middle_title);
        title.setText("新增");
        findViewById(R.id.btn_main_left).setOnClickListener(this);
        findViewById(R.id.tv_add_goods).setOnClickListener(this);
        findViewById(R.id.tv_buy_order).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent;
        switch (v.getId()) {
            case R.id.btn_main_left:
                finish();
                break;

            //新增商品
            case R.id.tv_add_goods:
                intent = new Intent(this, ChooseKindActivity.class);
                startActivity(intent);
                break;

            //下单
            case R.id.tv_buy_order:
                MyToast("下单");
                break;

            default:
                break;
        }
    }
}
